﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using 基于WPF的电缆采样数据分析系统.Tools.LangugeTool;

namespace 基于WPF的电缆采样数据分析系统.Converters
{
    /// <summary>
    /// 通道值转换器
    /// </summary>
    public class ChannelConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string channelInfo = "";

            switch((int)value)
            {
                case 0:
                    channelInfo = LangugeConvertor.GetValue("ChannelOne");
                    break;
                case 1:
                    channelInfo = LangugeConvertor.GetValue("ChannelTwo");
                    break;
                case 2:
                    channelInfo = LangugeConvertor.GetValue("ChannelThree");
                    break;
            }

            return channelInfo;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
